package com.industics.ibrain.npms;

import java.io.Serializable;
import java.util.Objects;

public class QrCode implements Serializable{

    private static final long serialVersionUID = -7580456830058023472L;

    private Long id;

    private String shortCode;

    private String urlPub;

    private Integer status;

    /**
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return short_code
     */
    public String getShortCode() {
        return shortCode;
    }

    /**
     * @param shortCode
     */
    public void setShortCode(String shortCode) {
        this.shortCode = shortCode;
    }

    /**
     * @return url_pub
     */
    public String getUrlPub() {
        return urlPub;
    }

    /**
     * @param urlPub
     */
    public void setUrlPub(String urlPub) {
        this.urlPub = urlPub;
    }

    /**
     * @return status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof QrCode)) return false;
        QrCode qrCode = (QrCode) o;
        return Objects.equals(getId(), qrCode.getId()) &&
                Objects.equals(getShortCode(), qrCode.getShortCode()) &&
                Objects.equals(getUrlPub(), qrCode.getUrlPub()) &&
                Objects.equals(getStatus(), qrCode.getStatus());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getShortCode(), getUrlPub(), getStatus());
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("QrCode{");
        sb.append("id=").append(id);
        sb.append(", shortCode='").append(shortCode).append('\'');
        sb.append(", urlPub='").append(urlPub).append('\'');
        sb.append(", status=").append(status);
        sb.append('}');
        return sb.toString();
    }
}